<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>vue 第二节</title>
		<script src="js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<input type="text" name="" id="" value="" v-model="inputValue" />	
			<button type="button" v-on:click="btnClick">提交</button>
			<ul>
				<li v-for="item in list">{{ item }}</li>
			
			</ul>
		</div>
	</body>
	<script type="text/javascript">
		var app = new Vue({
			el: '#app',
			data: {
				list: [],
				inputValue:""
			},
			methods: {
				btnClick: function(){
					this.list.push(this.inputValue)
					this.inputValue=""
				}
			}
		})
	</script>
</html>